package com.dao;

import com.bean.PaperCustom;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Ming on 2016/12/25.
 */
@Service
public class PaperCustomDao {
    @Autowired
    SqlSessionTemplate sqlSessionTemplate;
    //查询所有学生论文选定情况
    public List<PaperCustom> getAllPaperMsg(){
        return sqlSessionTemplate.selectList("com.dao.PaperCustomMapper.getAllPaperMsg");
    }

    public List<PaperCustom> getPaperMsgById(Long id){
        return sqlSessionTemplate.selectList("com.dao.PaperCustomMapper.getPaperMsgById",id);
    }
    public List<PaperCustom> getNotChoicePaperStudent(){
        return sqlSessionTemplate.selectList("com.dao.PaperCustomMapper.getNotChoicePaperStudent");
    }
    public List<PaperCustom> getChoicePaperStudentByTeacher(Long teacherid){
        return sqlSessionTemplate.selectList("com.dao.PaperCustomMapper.getChoicePaperStudentByTeacher",teacherid);
    }
    public List<PaperCustom> getNotChoicePaperStudentByTeacher(Long teacherid){
        return sqlSessionTemplate.selectList("com.dao.PaperCustomMapper.getNotChoicePaperStudentByTeacher",teacherid);
    }
    public List<PaperCustom> getStudentNotPaperChoice(Long studentid){
        return sqlSessionTemplate.selectList("com.dao.PaperCustomMapper.getStudentNotPaperChoice",studentid);
    }
}
